/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class DiagnoseDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idDiag;
	public final StringExpression diagnostico;
	
	public DiagnoseDetachedCriteria() {
		super(orm.Diagnose.class, orm.DiagnoseCriteria.class);
		idDiag = new IntegerExpression("idDiag", this.getDetachedCriteria());
		diagnostico = new StringExpression("diagnostico", this.getDetachedCriteria());
	}
	
	public DiagnoseDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.DiagnoseCriteria.class);
		idDiag = new IntegerExpression("idDiag", this.getDetachedCriteria());
		diagnostico = new StringExpression("diagnostico", this.getDetachedCriteria());
	}
	
	public BabyMonitorDetachedCriteria createBabyMonitorCodSystemCriteria() {
		return new BabyMonitorDetachedCriteria(createCriteria("babyMonitorCodSystem"));
	}
	
	public PacientDetachedCriteria createPacientidPacienteCriteria() {
		return new PacientDetachedCriteria(createCriteria("pacientidPaciente"));
	}
	
	public SolutionDetachedCriteria createSolutionCriteria() {
		return new SolutionDetachedCriteria(createCriteria("solution"));
	}
	
	public Diagnose uniqueDiagnose(PersistentSession session) {
		return (Diagnose) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Diagnose[] listDiagnose(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Diagnose[]) list.toArray(new Diagnose[list.size()]);
	}
}

